package com.cucker.urlforwarder.util;

import com.google.common.net.InetAddresses;

public class IpAddress {
    /**
     * 检查是否为合法的IP
     * @param ip
     * @return
     */
    public static boolean isValidIP(String ip) {
        if (ip == null) {
            return false;
        }
        return InetAddresses.isInetAddress(ip);
    }
}
